-- GENERATED SPELL FOR [Skeletal Summoner] --


function spell0_7342(pUnit, Event) --@Curse of Weakness,n/a--
pUnit:FullCastSpellOnTarget(11980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7342', 628, 1)
end

function spell1_7342(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7342', 3000, 1)
end

function spell2_7342(pUnit, Event) --@Summon Shadowcaster,Self--
pUnit:FullCastSpellOnTarget(12258,pUnit)
pUnit:RegisterEvent('Sorts_7342', 5000, 1)
end

function Sorts_7342(pUnit, Event)
local choix_sorts_7342 = math.random(0, 2)
if choix_sorts_7342 == 0 then
pUnit:RegisterEvent('spell0_7342', 1, 1)
end
if choix_sorts_7342 == 1 then
pUnit:RegisterEvent('spell1_7342', 1, 1)
end
if choix_sorts_7342 == 2 then
pUnit:RegisterEvent('spell2_7342', 1, 1)
end
end

function mob7342_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7342', math.random(1500, 3000), 1)
end

function mob7342_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7342_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7342_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7342, 1, 'mob7342_Action')
RegisterUnitEvent(7342, 2, 'mob7342_Leave')
RegisterUnitEvent(7342, 3, 'mob7342_Kill')
RegisterUnitEvent(7342, 4, 'mob7342_Die')
